/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package io.bsly.common.utils;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 常量
 *
 * @author Mark sunlightcs@gmail.com
 */
public class Constant {
    /** 当前用户的userId */
    public static final String USER_KEY = "userId";

    /** 系统用户token*/
    public static final String SYS_USER_TOKEN = "sys:user:token:";


	/** 超级管理员ID */
	public static final int SUPER_ADMIN = 1;
    /**
     * 当前页码
     */
    public static final String PAGE = "page";
    /**
     * 每页显示记录数
     */
    public static final String LIMIT = "limit";
    /**
     * 排序字段
     */
    public static final String ORDER_FIELD = "sidx";
    /**
     * 排序方式
     */
    public static final String ORDER = "order";
    /**
     *  升序
     */
    public static final String ASC = "asc";

    //订单token
    public static final String USER_ORDER_TOKEN_PREFIX = "order:token:";

    // 抖音订单确认
    public static final String QUEUE_DOUYIN_ORDER_ACCEPT = "queue_douyin_order_accept";
    // 抖音订单拒绝
    public static final String QUEUE_DOUYIN_ORDER_REFUSE = "queue_douyin_order_refuse";

    // 新订单通知队列
    public static final String NOTIFY_QUEUE_ORDER_NEW = "notify.queue.order.new";
    // 订单修改
    public static final String NOTIFY_QUEUE_ORDER_MODIFY = "notify.queue.order.modify";
    // 订单新取消通知
    public static final String NOTIFY_QUEUE_ORDER_CANCEL = "notify.queue.order.cancel";
    // 发单通知
    public static final String NOTIFY_QUEUE_ORDER_SEND = "notify.queue.order.send";
    // 发单接受
    public static final String NOTIFY_QUEUE_ORDER_SEND_ACCEPT = "notify.queue.order.send.accept";
    // 发单拒绝
    public static final String NOTIFY_QUEUE_ORDER_SEND_REFUSE = "notify.queue.order.send.refuse";

    // 待支付
    public final static String ORDER_STATUS_PAYING = "0";
    // 待处理
    public final static String ORDER_STATUS_PENDING = "1";
    // 已接受
    public final static String ORDER_STATUS_ACCEPT = "2";
    // 已拒绝
    public final static String ORDER_STATUS_REFUSE = "3";

    // 订单类型
    // 新订
    public final static String ORDER_TYPE_NEW = "N";
    // 修改
    public final static String ORDER_TYPE_MODIFY = "M";
    // 取消
    public final static String ORDER_TYPE_CANCEL = "C";
    // 延住
    public final static String ORDER_TYPE_YZ = "D";
    // 无效
    public final static String ORDER_TYPE_INVALID = "T";

    /**
     * 抖店token
     */
    public final static String DOUDIAN_ACCESS_TOKEN =  "doudian:token:accessToken";
    public final static String DOUDIAN_REFRESH_TOKEN = "doudian:token:refreshToken";
    public final static String DOUDIAN_ACCESS_TOKEN_BEAN =  "doudian:token:accessTokenBean";
    /**
     * 抖音订单状态
     * 1.待确认 2 已确认（待入住） 3已完成 4拒绝' 5 客户取消,
     */
    @Getter
    @AllArgsConstructor
    public enum OrderStatus{
        WAIT(1),
        CONFIRMED(2),
        DONE(3),
        REFULE(4),
        USER_CANCEL(5);
        private int value;
    }

    /**
     *  核销码状态1 待激活 2激活 3无效使用完次数，4激活失败
     */
        @Getter
        @AllArgsConstructor
        public enum CouponStatus {
            UNACTIVE(1),
            ACTIVE(2),
            INVALID(3),
            FAIL(4);
            private int value;
        }





	/**
	 * 菜单类型
	 * 
	 * @author chenshun
	 * @email sunlightcs@gmail.com
	 * @date 2016年11月15日 下午1:24:29
	 */
    public enum MenuType {
        /**
         * 目录
         */
    	CATALOG(0),
        /**
         * 菜单
         */
        MENU(1),
        /**
         * 按钮
         */
        BUTTON(2);

        private int value;

        MenuType(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }
    
    /**
     * 定时任务状态
     * 
     * @author chenshun
     * @email sunlightcs@gmail.com
     * @date 2016年12月3日 上午12:07:22
     */
    public enum ScheduleStatus {
        /**
         * 正常
         */
    	NORMAL(0),
        /**
         * 暂停
         */
    	PAUSE(1);

        private int value;

        ScheduleStatus(int value) {
            this.value = value;
        }
        
        public int getValue() {
            return value;
        }
    }

    /**
     * 云服务商
     */
    public enum CloudService {
        /**
         * 七牛云
         */
        QINIU(1),
        /**
         * 阿里云
         */
        ALIYUN(2),
        /**
         * 腾讯云
         */
        QCLOUD(3);

        private int value;

        CloudService(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }

}
